Matching Code to an Algorithm